package biolabs.query;

import biolabs.core.BioObject;

/**
 * Expression can be evaluated against a bio-object.
 * The result value can be used in filtering predicates.
 *
 * @author Tomas Mikula
 */
public interface Expression {

	/**
	 * Evaluates this expression against the given bio-object.
	 * {@code null} is returned if the expression is undefined
	 * for the given bio-object (for example, when it is an
	 * {@link AttributeExpression} and its attribute is not
	 * present in the given bio-object).
	 * @return the result of the evaluation or {@code null} if
	 * the expression is undefined for the given bio-object.
	 */
	public Object eval(BioObject obj);

}
